Ext.define('StaffServer.store.TrainInfoStore', {
	extend : 'StaffServer.common.base.store.BaseStore',
	requires : [ 'StaffServer.model.TrainInfoModel' ],
	model : 'StaffServer.model.TrainInfoModel',

	autoLoad : true,
	remoteSort : true,

	proxy : {
		type : 'ajax',
		url : 'traininfo/findTrainInfoPage',
		actionMethods: {   
            read: 'POST'  
        },
		reader : {
			type : 'json',
			root : 'root',
			successProperty : 'success',
			totalProperty : 'totalProperty'
		}
	},
	
	sorters: [{ 
        property: 'sn', 
        direction: 'DESC' 
    }],

	listeners : {
		load : function(store, records, successful, operation, opts) {
			if (!successful) {
				Ext.Msg.alert('提示', '数据加载失败!');
			}
		}
	}

});